package com.esdk.sql.orm;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;

/***
 * @author 范飞宇
 * @since 2006.?.? 
 */
public interface IRow<T extends IRow> extends IChangeable{
	Object get(String key);
	T put(String key,Object v);
	Short getShort(String key);
	Integer getInteger(String key);
	Long getLong(String key);
	Double getDouble(String key);
	Float getFloat(String key);
	String getString(String key);
	Boolean getBoolean(String key);
	Date getDate(String key);
	LocalDateTime getLocalDateTime(String key);

	BigDecimal getBigDecimal(String key);

	@JSONField(serialize=false) 
	String[] getColumns();
	boolean hasColumnName(String name);
	Object[] toArray();
	Object[] toArray(String...labels);
	List toList();
	List toList(String...labels);
	String toCsv();
	String toCsv(boolean isExportHeaders);
	String toCsv(String...labels);
	String toCsv(boolean isExportHeaders,String...labels);
	String toXml();
	String toXml(String...labels);
	JSONObject toJsonObject();
	JSONObject toJsonObject(String... labels);
	JSONObject toJsonObject(boolean formatJavaBeanName);
	JSONObject toJsonObject(boolean formatJavaBeanName,String... labels);
	T load(IRow row);
	T load(Map rowMap);
	T load(Map map,boolean ignoreNull,boolean checkExistColumn,boolean isFormatJavaBeanProperty);
	T clone() ;
	@JSONField(serialize=false)
	Map record();
	@JSONField(serialize=false) 
	Map toMap();
	Map toMap(boolean isFormatJavaBeanName,String...columns);
	Map toMap(boolean isFormatJavaBeanName,String[] columns,String[] excludeCols);
	@JSONField(serialize=false) 
	Map getChanged();
}
